package com.mezz.bones.framework.payment.service;

import com.mezz.bones.framework.core.strategy.IStrategy;
import com.mezz.bones.framework.payment.domain.request.PayRequest;
import com.mezz.bones.framework.payment.domain.request.RefundRequest;
import com.mezz.bones.framework.payment.domain.response.PayResponse;
import com.mezz.bones.framework.payment.domain.response.PayQueryResponse;

public interface IPayService extends IStrategy {

  /**
   * @author mezz
   * @date 2022/5/29 22:18
   * @description
   *
   * 0.加载支付配置信息
   * 1.构建请求参数
   * 2.生成参数签名
   * 3.发起请求
   * 4.构建结果集
   */
  PayResponse pay(PayRequest payRequest);

  /**
   * @author mezz
   * @date 2022/5/30 10:36
   * @description
   * 支付订单查询
   */
  PayQueryResponse query(String tradeOutNo);

  /**
   * @author mezz
   * @date 2022/5/30 10:37
   * @description
   * 退款
   */
  void refund(RefundRequest request);
}
